Skip to content

Adding dra-kubelet communication volumes#1297

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:mainfrom
yevgeny-shnaidman:yevgeny/add-dra-volumes
Jun 29, 2026
Merged

Adding dra-kubelet communication volumes#1297
kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:mainfrom
yevgeny-shnaidman:yevgeny/add-dra-volumes

Conversation

@yevgeny-shnaidman

Copy link
Copy Markdown
Contributor

This commit add mapping of a number of volumes and envs that are necessary for DRA driver <--> kubelet communication

@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for kubernetes-sigs-kmm ready!

Name Link
🔨 Latest commit 7d47413
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kmm/deploys/6a424f43af3b4800089e30d9
😎 Deploy Preview https://deploy-preview-1297--kubernetes-sigs-kmm.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubernetes-prow kubernetes-prow Bot requested a review from mresvanis June 29, 2026 08:01
@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yevgeny-shnaidman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot requested a review from TomerNewman June 29, 2026 08:01
@kubernetes-prow kubernetes-prow Bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 29, 2026
@yevgeny-shnaidman

Copy link
Copy Markdown
Contributor Author

/assing @ybettan

@yevgeny-shnaidman

Copy link
Copy Markdown
Contributor Author

/assign @ybettan

@codecov-commenter

codecov-commenter commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.90%. Comparing base (fa23a9b) to head (7d47413).
⚠️ Report is 389 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1297      +/-   ##
==========================================
- Coverage   79.09%   73.90%   -5.19%     
==========================================
  Files          51       67      +16     
  Lines        5109     5101       -8     
==========================================
- Hits         4041     3770     -271     
- Misses        882     1158     +276     
+ Partials      186      173      -13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yevgeny-shnaidman

Copy link
Copy Markdown
Contributor Author

/test pull-kernel-module-management-lint

},
{
Name: "HEALTHCHECK_PORT",
Value: fmt.Sprintf("%d", draHealthcheckPort),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if 2 DRA pods lands on the same node and both bind the 51515 port? One of them will probably fail isn't it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dra pods are deployed by daemonset, so 2 pods cannot land on the same node

containerVolumeMounts := []v1.VolumeMount{
{Name: kubeletPluginsVolumeName, MountPath: kubeletPluginsPath},
{Name: kubeletPluginsRegistryVolumeName, MountPath: kubeletPluginsRegistryPath},
{Name: cdiVolumeName, MountPath: cdiPath},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the CDI volume mount override the user mounts unlike the ENV variables that allows the user to override the pre-set variables. Is this by design? Shouldn't we have a consistent behavior?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they don't override user mount. See line 503

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed the order, so that user's volume's definition will take precedence

Comment thread internal/controllers/dra_reconciler.go Outdated
Spec: v1.PodSpec{
InitContainers: generatePodContainerSpec(mod.Spec.DRA.InitContainer, "dra-init", nil),
Containers: generatePodContainerSpec(&mod.Spec.DRA.Container, "dra", containerVolumeMounts),
Containers: []v1.Container{draContainer},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we keep using generatePodContainerSpec and append additional fields? This mean that what ever is added to the output of generatePodContainerSpec will not be inherited by this container.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@yevgeny-shnaidman yevgeny-shnaidman force-pushed the yevgeny/add-dra-volumes branch from 328756e to 96d9922 Compare June 29, 2026 10:27
This commit add mapping of a number of volumes and envs that are
necessary for DRA driver <--> kubelet communication
@yevgeny-shnaidman yevgeny-shnaidman force-pushed the yevgeny/add-dra-volumes branch from 96d9922 to 7d47413 Compare June 29, 2026 10:56
@ybettan

ybettan commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 29, 2026
@yevgeny-shnaidman

Copy link
Copy Markdown
Contributor Author

/test pull-kernel-module-management-lint

@kubernetes-prow kubernetes-prow Bot merged commit 756ef27 into kubernetes-sigs:main Jun 29, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants